package 栈的链表实现;

public class Test {
    public static void main(String[] args) {
        Stack1<Integer> stack1 = new Stack1<>(3);
        stack1.push(1);
        stack1.push(2);
        stack1.push(3);
        stack1.push(4);
        System.out.println(stack1.peek());
        System.out.println();
        stack1.pop();
        for (Integer i : stack1) {
            System.out.println(i);
        }
    }
}
